manifest[.]webmanifest.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import { json } from '@remix-run/node';
  2. export const loader = async () => {
  3. return json(
  4. {
  5. short_name: 'PWA',
  6. name: 'Remix PWA',
  7. start_url: '/',
  8. display: 'standalone',
  9. background_color: '#d3d7dd',
  10. theme_color: '#c34138',
  11. shortcuts: [
  12. {
  13. name: 'Homepage',
  14. url: '/',
  15. icons: [
  16. {
  17. src: '/icons/android-icon-96x96.png',
  18. sizes: '96x96',
  19. type: 'image/png',
  20. purpose: 'any monochrome',
  21. },
  22. ],
  23. },
  24. ],
  25. icons: [
  26. {
  27. src: '/icons/android-icon-36x36.png',
  28. sizes: '36x36',
  29. type: 'image/png',
  30. density: '0.75',
  31. },
  32. {
  33. src: '/icons/android-icon-48x48.png',
  34. sizes: '48x48',
  35. type: 'image/png',
  36. density: '1.0',
  37. },
  38. {
  39. src: '/icons/android-icon-72x72.png',
  40. sizes: '72x72',
  41. type: 'image/png',
  42. density: '1.5',
  43. },
  44. {
  45. src: '/icons/android-icon-96x96.png',
  46. sizes: '96x96',
  47. type: 'image/png',
  48. density: '2.0',
  49. },
  50. {
  51. src: '/icons/android-icon-144x144.png',
  52. sizes: '144x144',
  53. type: 'image/png',
  54. density: '3.0',
  55. },
  56. {
  57. src: '/icons/android-chrome-192x192.png',
  58. sizes: '192x192',
  59. type: 'image/png',
  60. },
  61. {
  62. src: '/icons/android-chrome-256x256.png',
  63. sizes: '256x256',
  64. type: 'image/png',
  65. },
  66. ],
  67. },
  68. {
  69. headers: {
  70. 'Cache-Control': 'public, max-age=600',
  71. 'Content-Type': 'application/manifest+json',
  72. },
  73. }
  74. );
  75. };